Skip to content

fix(scheduler): ignore queued stale success after defer#67330

Open
anmolxlight wants to merge 1 commit into
apache:mainfrom
anmolxlight:fix/67287-queued-defer-stale-success
Open

fix(scheduler): ignore queued stale success after defer#67330
anmolxlight wants to merge 1 commit into
apache:mainfrom
anmolxlight:fix/67287-queued-defer-stale-success

Conversation

@anmolxlight
Copy link
Copy Markdown
Contributor

Summary

  • Extend the resume-after-defer stale executor success handling to cover TaskInstanceState.QUEUED in addition to SCHEDULED.
  • Parametrize the scheduler regression test so both scheduled and queued post-trigger states avoid the external-kill mismatch path when next_method is set.

Testing

  • uv run --project airflow-core pytest airflow-core/tests/unit/jobs/test_scheduler_job.py::TestSchedulerJob::test_process_executor_events_stale_success_when_rescheduled_after_defer -q --with-db-init
  • uv run prek run ruff --files airflow-core/src/airflow/jobs/scheduler_job_runner.py airflow-core/tests/unit/jobs/test_scheduler_job.py
  • uv run prek run ruff-format --files airflow-core/src/airflow/jobs/scheduler_job_runner.py airflow-core/tests/unit/jobs/test_scheduler_job.py

Closes #67287

@anmolxlight anmolxlight requested review from XD-DENG and ashb as code owners May 22, 2026 12:46
@boring-cyborg boring-cyborg Bot added the area:Scheduler including HA (high availability) scheduler label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Scheduler including HA (high availability) scheduler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Race condition between scheduler processing events and trigger completion — queued-state

1 participant